<?php defined('SYSPATH') OR die('No direct access allowed.');
class Twitter_Access_Model extends ORM {
	protected $belongs_to = array('user');
	
	public function create($data)
	{
		$access = ORM::factory('twitter_access');
		foreach ($data as $field => $value)
		{
			$access->$field = $value;
		}
	    $id = $access->save();
	    if ($access->saved) {
	    	return $id;
	    }
	    else {
	    	return false;
	    }
	}

}
